.setup-body {
    --color-background: #0f1117;
    --color-surface: #161b22;
    --color-surface-alt: #1c2330;
    --color-text: #e2e8f0;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    --color-border: rgba(148, 163, 184, 0.2);
    --color-border-light: rgba(148, 163, 184, 0.15);
    --color-border-dark: rgba(15, 17, 23, 0.7);
    --color-accent: #6366f1;

    background: var(--color-background);
    color: var(--color-text);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.setup-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--spacing-xl, 32px) var(--spacing-lg, 24px) var(--spacing-2xl, 56px);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl, 32px);
}

.setup-header {
    text-align: center;
    background: var(--color-surface, #161b22);
    border-radius: var(--radius-lg, 16px);
    padding: var(--spacing-xl, 32px) var(--spacing-lg, 24px);
    box-shadow: var(--shadow-lg, 0 24px 48px rgba(15, 17, 23, 0.35));
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.05));
}

.setup-header h1 {
    margin: 0 0 var(--spacing-md, 16px);
    font-size: clamp(2rem, 2.5vw, 2.5rem);
    font-weight: 700;
}

.setup-header p {
    margin: 0;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-text-secondary, #94a3b8);
    line-height: 1.6;
}

.setup-section {
    background: var(--color-surface, #161b22);
    border-radius: var(--radius-lg, 16px);
    padding: var(--spacing-xl, 32px);
    box-shadow: var(--shadow-md, 0 16px 32px rgba(15, 17, 23, 0.3));
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.05));
}

.wizard-section {
    position: relative;
    overflow: hidden;
}

.wizard-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 24px);
}

.wizard-step-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.wizard-step-description {
    margin: 0;
    color: var(--color-text-secondary, #94a3b8);
    line-height: 1.6;
}

.wizard-options {
    display: grid;
    gap: var(--spacing-md, 16px);
    border: 0;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.wizard-option {
    display: flex;
    gap: var(--spacing-md, 16px);
    align-items: flex-start;
    background: rgba(15, 17, 23, 0.55);
    border-radius: var(--radius-md, 12px);
    border: 1px solid rgba(99, 102, 241, 0.15);
    padding: var(--spacing-md, 16px) var(--spacing-lg, 24px);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.wizard-option:hover,
.wizard-option:focus-within {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.12);
    transform: translateY(-1px);
}

.wizard-option.selected {
    border-color: rgba(99, 102, 241, 0.75);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.18);
}

.wizard-option input[type="radio"],
.wizard-option input[type="checkbox"] {
    margin-top: 0.35rem;
    transform: scale(1.2);
}

.wizard-option-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs, 8px);
}

.wizard-option-title {
    font-weight: 600;
    font-size: 1rem;
}

.wizard-option-hint {
    color: var(--color-text-secondary, #94a3b8);
    font-size: 0.9rem;
    margin: 0;
}

.wizard-option-details {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--color-text-muted, #64748b);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: disc;
}


.install-sections {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 24px);
}

.install-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 16px);
    padding: var(--spacing-md, 16px) var(--spacing-lg, 24px);
    border-radius: var(--radius-md, 12px);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 17, 23, 0.45);
    box-shadow: 0 12px 26px rgba(15, 17, 23, 0.28);
}

.install-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--spacing-sm, 12px);
}

.install-section-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.install-section-description {
    margin: 0;
    color: var(--color-text-secondary, #94a3b8);
    line-height: 1.5;
}

.install-option-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 12px);
}

.install-option-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs, 8px);
    padding: var(--spacing-sm, 12px) var(--spacing-md, 16px);
    border-radius: var(--radius-sm, 10px);
    border: 1px solid rgba(99, 102, 241, 0.18);
    background: rgba(15, 17, 23, 0.55);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.install-option-card:hover,
.install-option-card:focus-within {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.18);
}

.install-option-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm, 12px);
}

.install-option-header input[type="checkbox"] {
    transform: scale(1.1);
}

.install-option-label {
    font-weight: 600;
    font-size: 1rem;
}

.install-option-hint {
    margin: 0;
    color: var(--color-text-secondary, #94a3b8);
    font-size: 0.9rem;
}

.install-variant-group {
    margin-left: 1.9rem;
    padding-left: var(--spacing-sm, 12px);
    border-left: 2px solid rgba(99, 102, 241, 0.25);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.install-variant-label {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted, #64748b);
}

.install-variant {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary, #94a3b8);
}

.install-variant input[type="checkbox"] {
    transform: scale(1.05);
}

.install-embeddings {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 12px);
}

.install-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.install-option input[type="checkbox"] {
    transform: scale(1.05);
}

.install-option span {
    flex: 1;
}

.install-custom-label {
    font-size: 0.95rem;
    font-weight: 600;
}

.install-custom-textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    padding: var(--spacing-sm, 12px);
    border-radius: var(--radius-sm, 8px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 17, 23, 0.6);
    color: var(--color-text, #e2e8f0);
    font-family: inherit;
}

.install-custom-textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.install-custom-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted, #64748b);
}

.install-empty {
    margin: 0;
    padding: var(--spacing-sm, 12px);
    border-radius: var(--radius-sm, 8px);
    background: rgba(148, 163, 184, 0.1);
    color: var(--color-text-muted, #64748b);
}
.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-xl, 32px);
    gap: var(--spacing-md, 16px);
}

.wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md, 16px);
    font-size: 0.9rem;
    color: var(--color-text-secondary, #94a3b8);
}

.wizard-progress strong {
    color: var(--color-text, #e2e8f0);
}

.wizard-message {
    margin-bottom: var(--spacing-md, 16px);
    padding: var(--spacing-sm, 12px) var(--spacing-md, 16px);
    border-radius: var(--radius-sm, 8px);
    border-left: 3px solid rgba(99, 102, 241, 0.45);
    background: rgba(99, 102, 241, 0.12);
    color: var(--color-text, #e2e8f0);
    display: none;
}

.wizard-message.visible {
    display: block;
}

.wizard-message.info {
    border-left-color: rgba(99, 102, 241, 0.6);
    background: rgba(99, 102, 241, 0.1);
}

.wizard-message.error {
    border-left-color: rgba(248, 113, 113, 0.65);
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

.wizard-message.success {
    border-left-color: rgba(34, 197, 94, 0.65);
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.wizard-actions {
    display: flex;
    gap: var(--spacing-sm, 12px);
}

.wizard-summary {
    margin-bottom: var(--spacing-lg, 24px);
    padding: var(--spacing-md, 16px);
    border-radius: var(--radius-md, 12px);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--color-text, #e2e8f0);
    line-height: 1.6;
}

.wizard-summary strong {
    color: #a5b4fc;
}

.wizard-summary ul {
    margin: var(--spacing-sm, 12px) 0 0;
    padding-left: 1.2rem;
    color: var(--color-text-secondary, #94a3b8);
}

.show-all {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs, 8px);
    margin-bottom: var(--spacing-md, 16px);
}

.module-walkthroughs {
    margin-bottom: var(--spacing-lg, 24px);
    padding: var(--spacing-md, 16px);
    border-radius: var(--radius-md, 12px);
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.16);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 16px);
}

.module-walkthrough-header h3 {
    margin: 0 0 var(--spacing-xs, 8px);
    font-size: 1.2rem;
}

.module-walkthrough-header p {
    margin: 0;
    color: var(--color-text-secondary, #94a3b8);
}

.module-walkthrough-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-md, 16px);
}

.module-walkthrough-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 12px);
    padding: var(--spacing-md, 16px);
    border-radius: var(--radius-md, 12px);
    background: rgba(15, 17, 23, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 24px rgba(15, 17, 23, 0.25);
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.module-walkthrough-card.recommended {
    border-color: rgba(99, 102, 241, 0.45);
}

.module-walkthrough-card.completed {
    opacity: 0.85;
}

.module-walkthrough-pill {
    align-self: flex-start;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.18);
    color: #c7d2fe;
    font-weight: 600;
}

.module-walkthrough-card h4 {
    margin: 0;
    font-size: 1rem;
}

.module-walkthrough-card p {
    margin: 0;
    color: var(--color-text-secondary, #94a3b8);
    flex: 1;
}

.module-walkthrough-card button {
    align-self: flex-start;
}

.module-walkthrough-card:hover,
.module-walkthrough-card:focus-within {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.wizard-additional {
    border-style: dashed;
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(15, 17, 23, 0.45);
}

.status-section {
    border-left: 3px solid var(--color-accent, #6366f1);
}

.status-content h2,
.section-heading h2 {
    margin-top: 0;
    margin-bottom: var(--spacing-sm, 12px);
    font-size: 1.5rem;
}

.section-heading p {
    margin: 0;
    color: var(--color-text-secondary, #94a3b8);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg, 24px);
    margin-top: var(--spacing-md, 16px);
}

.status-label {
    display: block;
    color: var(--color-text-muted, #64748b);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    margin-bottom: var(--spacing-xs, 8px);
}

.status-value {
    font-weight: 600;
    font-size: 1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    background: var(--color-surface-alt, rgba(148, 163, 184, 0.1));
    color: var(--color-text, #e2e8f0);
    width: max-content;
}

.badge-alert {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

.badge-warning {
    background: rgba(250, 204, 21, 0.18);
    color: #facc15;
}

.badge-failure {
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
}

.status-notice {
    margin-top: var(--spacing-lg, 24px);
    padding: var(--spacing-md, 16px);
    border-radius: var(--radius-md, 12px);
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.config-sections {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 16px);
}

.section-card {
    background: var(--color-surface-alt, #1c2330);
    border-radius: var(--radius-md, 12px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.section-card[open] {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: var(--shadow-sm, 0 12px 24px rgba(99, 102, 241, 0.12));
}

.section-summary {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs, 8px);
    padding: var(--spacing-lg, 24px);
    background: rgba(99, 102, 241, 0.08);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    list-style: none;
}

.section-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-secondary, #94a3b8);
}

.fields-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg, 24px);
    padding: 0;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 24px);
    padding: var(--spacing-lg, 24px);
}

.section-info {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md, 12px);
    padding: var(--spacing-md, 16px) var(--spacing-lg, 24px);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 12px);
    color: var(--color-text, #e2e8f0);
    min-height: 100%;
}

.install-status-panel {
    margin-top: var(--spacing-xl, 32px);
    border-radius: var(--radius-md, 12px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(15, 17, 23, 0.65);
    padding: var(--spacing-lg, 24px);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 16px);
}

.install-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm, 12px);
}

.install-status-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.install-status-message {
    margin: 0;
    color: var(--color-text-secondary, #94a3b8);
}

.install-status-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 12px);
}

.install-step {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--spacing-sm, 12px) var(--spacing-md, 16px);
    border-radius: var(--radius-sm, 10px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(13, 17, 23, 0.65);
}

.install-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm, 12px);
}

.install-step-title {
    font-weight: 600;
}

.install-step-status {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.install-step-detail {
    margin: 0;
    color: var(--color-text-muted, #64748b);
    font-size: 0.9rem;
}

.install-step.failed {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
}

.install-step.skipped {
    border-color: rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.1);
}

.install-step.completed {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.1);
}

.install-status-errors {
    border-radius: var(--radius-sm, 10px);
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
    padding: var(--spacing-sm, 12px) var(--spacing-md, 16px);
    color: #fca5a5;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.install-status-errors strong {
    color: #fecaca;
}

.install-status-errors ul {
    margin: 0;
    padding-left: 1.1rem;
}

.install-status-errors li {
    margin: 0;
    padding: 0;
}

.section-info-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #c7d2fe;
}

.section-info-body {
    margin: 0;
    color: var(--color-text-secondary, #94a3b8);
    line-height: 1.6;
}

.section-info-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--color-text-secondary, #94a3b8);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs, 8px);
    list-style: disc;
}

.section-info-note {
    margin: 0;
    font-size: 0.9rem;
    color: #fcd34d;
}

.section-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    margin-left: auto;
}

.section-pill.recommended {
    background: rgba(99, 102, 241, 0.18);
    color: #c7d2fe;
}

.section-pill.optional {
    background: rgba(148, 163, 184, 0.16);
    color: var(--color-text-muted, #64748b);
}

.field-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 12px);
    padding: var(--spacing-md, 16px);
    border-radius: var(--radius-md, 12px);
    background: rgba(15, 17, 23, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-card.wide {
    grid-column: span 2;
}

.field-card.placeholder {
    border-color: rgba(248, 113, 113, 0.35);
}

.field-card.dirty {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.field-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.field-input {
    display: flex;
    gap: var(--spacing-sm, 12px);
    align-items: center;
}

.field-input input[type="text"],
.field-input input[type="number"],
.field-input input[type="password"],
.field-input textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm, 8px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 17, 23, 0.8);
    color: var(--color-text, #e2e8f0);
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input input::placeholder,
.field-input textarea::placeholder {
    color: var(--color-text-muted, #64748b);
    opacity: 1;
}

.field-input textarea {
    min-height: 120px;
    resize: vertical;
}

.field-input input:focus,
.field-input textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.field-input input[type="checkbox"] {
    width: auto;
    accent-color: var(--color-accent, #6366f1);
    transform: scale(1.2);
}

.field-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted, #64748b);
}

.btn {
    border: none;
    border-radius: var(--radius-sm, 8px);
    padding: 0.65rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.btn.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.btn.subtle {
    background: rgba(148, 163, 184, 0.12);
    color: var(--color-text, #e2e8f0);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.2);
}

.btn.reveal {
    padding: 0.55rem 0.9rem;
    box-shadow: none;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md, 16px);
    align-items: center;
}

.toggle-option {
    display: inline-flex;
    gap: var(--spacing-sm, 12px);
    align-items: center;
    font-size: 0.95rem;
    color: var(--color-text-secondary, #94a3b8);
}

.action-message {
    margin-top: var(--spacing-lg, 24px);
    padding: var(--spacing-md, 16px);
    border-radius: var(--radius-md, 12px);
    background: rgba(148, 163, 184, 0.08);
    white-space: pre-line;
}

.action-message.success {
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.action-message.error {
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

.action-message.info {
    background: rgba(96, 165, 250, 0.12);
    color: #bfdbfe;
}

.empty-state {
    padding: var(--spacing-xl, 32px);
    text-align: center;
    color: var(--color-text-muted, #64748b);
}

.assistant-root {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--spacing-sm, 12px);
    z-index: 1200;
}

.assistant-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs, 8px);
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.1rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.25);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.assistant-root.assistant-open .assistant-toggle {
    display: none;
}

.assistant-toggle:hover,
.assistant-toggle:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(99, 102, 241, 0.35);
}

.assistant-panel {
    width: min(360px, calc(100vw - 32px));
    max-height: min(520px, calc(100vh - 120px));
    background: var(--color-surface-alt, #1c2330);
    border-radius: var(--radius-lg, 16px);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 24px 48px rgba(15, 17, 23, 0.55);
    padding: var(--spacing-md, 16px);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 16px);
}

.assistant-panel[hidden] {
    display: none;
}

.assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm, 12px);
}

.assistant-title {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs, 8px);
    font-weight: 600;
}

.assistant-close {
    border: none;
    background: rgba(148, 163, 184, 0.12);
    color: var(--color-text, #e2e8f0);
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.assistant-close:hover,
.assistant-close:focus-visible {
    background: rgba(148, 163, 184, 0.22);
}

.assistant-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 12px);
    padding-right: 4px;
}

.assistant-message {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs, 8px);
}

.assistant-message.user {
    align-items: flex-end;
}

.assistant-message.assistant {
    align-items: flex-start;
}

.assistant-bubble {
    max-width: 100%;
    padding: var(--spacing-sm, 12px) var(--spacing-md, 16px);
    border-radius: var(--radius-md, 12px);
    line-height: 1.5;
    background: rgba(99, 102, 241, 0.18);
    color: var(--color-text, #e2e8f0);
}

.assistant-message.user .assistant-bubble {
    background: rgba(148, 163, 184, 0.18);
}

.assistant-suggestions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs, 8px);
}

.assistant-link {
    border: none;
    background: rgba(148, 163, 184, 0.15);
    color: var(--color-text, #e2e8f0);
    font-size: 0.9rem;
    border-radius: var(--radius-sm, 8px);
    padding: 0.35rem 0.75rem;
    text-align: left;
    cursor: pointer;
}

.assistant-link:hover,
.assistant-link:focus-visible {
    background: rgba(99, 102, 241, 0.25);
}

.assistant-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 12px);
}

.assistant-input {
    width: 100%;
    min-height: 72px;
    border-radius: var(--radius-sm, 8px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 17, 23, 0.75);
    color: var(--color-text, #e2e8f0);
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    resize: vertical;
}

.assistant-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.assistant-actions {
    display: flex;
    justify-content: flex-end;
}

.assistant-send {
    min-width: 90px;
}

.assistant-typing {
    font-size: 0.85rem;
    color: var(--color-text-muted, #64748b);
}

.module-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 17, 23, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    padding: var(--spacing-lg, 24px);
}

.module-overlay[hidden] {
    display: none;
}

.module-overlay-content {
    width: min(560px, 100%);
    max-height: min(620px, 100%);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 16px);
    background: var(--color-surface, #161b22);
    border-radius: var(--radius-lg, 16px);
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 32px 64px rgba(15, 17, 23, 0.6);
    padding: var(--spacing-lg, 24px);
}

.module-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm, 12px);
}

.module-overlay-title-group {
    display: inline-flex;
    gap: var(--spacing-xs, 8px);
    align-items: center;
}

.module-overlay-title {
    margin: 0;
    font-size: 1.2rem;
}

.module-overlay-icon {
    font-size: 1.2rem;
}

.module-overlay-close {
    border: none;
    background: rgba(148, 163, 184, 0.12);
    color: var(--color-text, #e2e8f0);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.module-overlay-close:hover,
.module-overlay-close:focus-visible {
    background: rgba(148, 163, 184, 0.22);
}

.module-overlay-intro {
    margin: 0;
    color: var(--color-text-secondary, #94a3b8);
}

.module-overlay-step-status {
    font-size: 0.85rem;
    color: var(--color-text-muted, #64748b);
}

.module-overlay-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 12px);
}

.module-overlay-body p {
    margin: 0;
    line-height: 1.6;
}

.module-overlay-body ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--color-text-secondary, #94a3b8);
}

.module-overlay-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md, 16px);
}

.module-overlay-actions {
    display: flex;
    gap: var(--spacing-sm, 12px);
}

.focus-highlight {
    animation: focusPulse 2s ease forwards;
    border-color: rgba(99, 102, 241, 0.75) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35) !important;
}

@keyframes focusPulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.0); }
    30% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.25); }
    60% { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35); }
    100% { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35); }
}

@media (max-width: 768px) {
    .section-content {
        padding: var(--spacing-lg, 24px) var(--spacing-md, 16px);
    }

    .section-info {
        margin-bottom: var(--spacing-md, 16px);
    }

    .fields-wrapper {
        grid-template-columns: 1fr;
    }

    .field-card.wide {
        grid-column: span 1;
    }

    .setup-layout {
        padding: var(--spacing-lg, 24px) var(--spacing-md, 16px);
    }

    .wizard-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .wizard-actions {
        width: 100%;
        flex-direction: column-reverse;
    }

    .wizard-actions .btn,
    #wizardBack {
        width: 100%;
    }

    .assistant-root {
        right: 16px;
        bottom: 16px;
    }

    .assistant-panel {
        width: calc(100vw - 32px);
        max-height: calc(100vh - 96px);
    }

    .module-walkthrough-list {
        grid-template-columns: 1fr;
    }

    .module-overlay-content {
        width: calc(100vw - 32px);
        max-height: calc(100vh - 48px);
    }
}
